import time

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

from pages.basePage import BasePage

wd = webdriver.Chrome('C:\Program Files\Google\Chrome\Application\chromedriver.exe')
class SousuoPage(BasePage):
    sousuo = (By.ID,"keyword")
    web = 'http://192.168.153.135/'
    def Sousuo(self, nei):
        wd.get(self.web)
        time.sleep(1)
        wd.find_element(*self.sousuo).clear()
        time.sleep(1)
        wd.find_element(*self.sousuo).send_keys(nei)
        wd.find_element(*self.sousuo).send_keys(Keys.ENTER)


if __name__ == '__main__':
    sou = SousuoPage()
    sou.Sousuo(nei='戒指')
